<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    canvas {
      border: 1px solid #333;
    }
  </style>
</head>

<body>
  <canvas width="600" height="400"></canvas>
</body>
<script>
  let canvas = document.querySelector("canvas")
  let ctx = canvas.getContext("2d")

  //绘制外圆
  ctx.translate(300, 200)     //移动坐标系

  ctx.arc(0, 0, 200, 0, Math.PI * 2, false)
  ctx.lineWidth = 5;
  ctx.stroke()

  //绘制辐射线
  for (let i = 0; i < 12; i++) {
    ctx.save()            //保存原来坐标系
    ctx.rotate(i * 30 * Math.PI / 180)        //旋转坐标系
    ctx.moveTo(0, 0)
    ctx.lineTo(200, 0)
    ctx.stroke()
    ctx.restore()         //恢复到原来坐标系
  }

  //绘制内圆
  ctx.beginPath()
  ctx.arc(0, 0, 180, 0, Math.PI * 2, false)
  ctx.fillStyle = "white"
  ctx.fill()



  //写数字
  ctx.beginPath()
  ctx.fillStyle = "black"
  let arr = ["III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "I", "II"]
  for (let i = 0; i < 12; i++) {
    let x = 160 * Math.cos(i * 30 * Math.PI / 180)
    let y = 160 * Math.sin(i * 30 * Math.PI / 180)

    ctx.font = "20px 微软雅黑"
    ctx.textAlign = "center"
    ctx.textBaseline = "middle"
    ctx.fillText(arr[i], x, y)        //填写文字
  }

  //写品牌
  ctx.beginPath()
  ctx.font = "16px 微软雅黑"
  ctx.fillText("Dianel Wellington", 0, -90)


  // let x=180*Math.cos(1*30*Math.PI/180)
  // let y=180*Math.sin(1*30*Math.PI/180)

  // let x=180*Math.cos(2*30*Math.PI/180)
  // let y=180*Math.sin(2*30*Math.PI/180)

  // let x=180*Math.cos(3*30*Math.PI/180)
  // let y=180*Math.sin(3*30*Math.PI/180)

</script>

</html>